<html><head><title>Type Naming and LDO Data Types</title>
<STYLE type='text/css'>
    .title { color: #990000; font-size: 22px; line-height: 22px; font-weight: bold; text-align: right;
             font-family: helvetica, arial, sans-serif }
    .filename { color: #666666; font-size: 18px; line-height: 28px; font-weight: bold; text-align: right;
                  font-family: helvetica, arial, sans-serif }
    p.copyright { color: #000000; font-size: 10px;
                  font-family: verdana, charcoal, helvetica, arial, sans-serif }
    p { margin-left: 2em; margin-right: 2em; }
    ol { margin-left: 2em; margin-right: 2em; }
    ul.text { margin-left: 2em; margin-right: 2em; }
    pre { margin-left: 3em; color: #333333 }
    ul.toc { color: #000000; line-height: 16px;
             font-family: verdana, charcoal, helvetica, arial, sans-serif }
    H3 { color: #333333; font-size: 16px; line-height: 16px; font-family: helvetica, arial, sans-serif }
    H4 { color: #000000; font-size: 14px; font-family: helvetica, arial, sans-serif }
    TD.header { color: #ffffff; font-size: 10px; font-family: arial, helvetica, san-serif; valign: top }
    TD.author-text { color: #000000; font-size: 10px;
                     font-family: verdana, charcoal, helvetica, arial, sans-serif }
    TD.author { color: #000000; font-weight: bold; margin-left: 4em; font-size: 10px; font-family: verdana, charcoal, helvetica, arial, sans-serif }
    A:link { color: #990000; font-size: 10px; text-transform: uppercase; font-weight: bold;
             font-family: MS Sans Serif, verdana, charcoal, helvetica, arial, sans-serif }
    A:visited { color: #333333; font-weight: bold; font-size: 10px; text-transform: uppercase;
                font-family: MS Sans Serif, verdana, charcoal, helvetica, arial, sans-serif }
    A:name { color: #333333; font-weight: bold; font-size: 10px; text-transform: uppercase;
             font-family: MS Sans Serif, verdana, charcoal, helvetica, arial, sans-serif }
    .link2 { color:#ffffff; font-weight: bold; text-decoration: none;
             font-family: monaco, charcoal, geneva, MS Sans Serif, helvetica, monotype, verdana, sans-serif;
             font-size: 9px }
    .RFC { color:#666666; font-weight: bold; text-decoration: none;
           font-family: monaco, charcoal, geneva, MS Sans Serif, helvetica, monotype, verdana, sans-serif;
           font-size: 9px }
    .hotText { color:#ffffff; font-weight: normal; text-decoration: none;
               font-family: charcoal, monaco, geneva, MS Sans Serif, helvetica, monotype, verdana, sans-serif;
               font-size: 9px }
</style>
</head>
<body bgcolor="#ffffff"alink="#000000" vlink="#666666" link="#990000">
<table width="66%" border="0" cellpadding="0" cellspacing="0"><tr><td><table width="100%" border="0" cellpadding="2" cellspacing="1">
<tr valign="top"><td width="33%" bgcolor="#666666" class="header">Early Draft</td><td width="33%" bgcolor="#666666" class="header">K. MacLeod</td></tr>
<tr valign="top"><td width="33%" bgcolor="#666666" class="header">ldo-types</td><td width="33%" bgcolor="#666666" class="header">The Casbah Project</td></tr>
<tr valign="top"><td width="33%" bgcolor="#666666" class="header">&nbsp;</td><td width="33%" bgcolor="#666666" class="header">October 1999</td></tr>
</table></td></tr></table>
<div align="right"><font face="monaco, MS Sans Serif" color="#990000" size="+3"><b><br><span class="title">Type Naming and LDO Data Types</span></b></font></div>
<font face="verdana, helvetica, arial, sans-serif" size="2">

<h3>Abstract</h3>

<p>
This document specifies a format for type names used to
  declare the data types of marshalled data.  It also specifies a
  basic set of data types for use with LDO protocols, as well as
  formats for declaring object type names in Java, Perl, and
  Python.
</p>

<a name="anchor1"><br><hr size="1" shade="0"></a>
<h3>1.&nbsp;Introduction</h3>

<p>
[This document is a very early draft, expect some rather major
    changes as discussion ensues.]
</p>

<p>
This format is being developed as part of <a href="http://casbah.org/Scarab/">Scarab</a>, a framework for
    handling data and distributed computing.  Scarab itself is being
    developed as part of <a href="http://casbah.org/">Casbah</a>, a language independent
    environment for writing applications that access a wide variety of
    data sources.  Scarab supports using data type names other than
    the ones described here, such as CORBA, DCOM, Java RMI, or
    language-specific data types.
</p>

<p>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
    "OPTIONAL" in this document are to be interpreted as described in
    <a href="#refs.rfc2119">RFC 2119</a>[3].
</p>

<p>
Within this draft, text enclosed within brackets (`[text]')
    represents issues or incomplete specifications.
</p>

<h4><a name="anchor2">1.1</a>&nbsp;Examples of data type names</h4>

<blockquote class="text">

<p>
ldo:number
</p>

<p>
mime:TYPE/SUBTYPE
</p>

<p>
python:MODULE/CLASS
</p>

<p>
perl:PACKAGE
</p>

<p>
java:FULLY.QUALIFIED.CLASS.NAME
</p>

</blockquote>

<a name="anchor3"><br><hr size="1" shade="0"></a>
<h3>2.&nbsp;Type name syntax</h3>

<p>
The type name format is patterned after Universal Resource
    Identifiers (URIs) in <a href="#refs.rfc1630">RFC 1630</a>[2].
</p>

<p>
A complete type name consists of a naming scheme specifier followed
    by a string whose format is a function of the naming scheme.  A
    BNF description of the type name syntax is given in an a later
    section. The components are as follows.
</p>

<blockquote class="text"><dl>

<dt>SCHEME</dt>
<dd>
Within the type name, the first element is
      the name of the scheme, separated from the rest of the type name
      by a colon.
</dd>

<dt>LOCAL-PART</dt>
<dd>
The rest of the type name follows the
      colon in a format depending on the scheme. The local part is
      interpreted in a manner dependent on the scheme being used.
</dd>

</dl></blockquote>

<p>
[do we need to support URL escaping?  I.e. %2E.]
</p>

<a name="anchor4"><br><hr size="1" shade="0"></a>
<h3>3.&nbsp;Specific Schemes</h3>

<p>
The mapping for type names onto some existing standard and
    experimental type schemes is outlined in the BNF syntax
    definition.  Notes on particular naming schemes follows.  The
    schemes covered are:
    
      
<blockquote class="text"><dl>

<dt>ldo</dt>
<dd>
Basic data types used in LDO protocols
</dd>

<dt>mime</dt>
<dd>
MIME types (RFC [XXX])
</dd>

<dt>java</dt>
<dd>
Java fully qualified class names
</dd>

<dt>perl</dt>
<dd>
Perl package names
</dd>

<dt>python</dt>
<dd>
Python module and class names
</dd>

</dl></blockquote>

</p>

<p>
The schemes for Java, Perl, and Python only describe the naming
    scheme for serialized object instances, not primitive data types.
    Naming for primitive data types in particular languages are
    described in other specifications.
</p>

<h4><a name="anchor5">3.1</a>&nbsp;LDO</h4>

<p>
The LDO scheme specifies basic or primitive data types used
      in LDO protocols.
</p>

<p>
[more detail]
</p>

<h4><a name="anchor6">3.2</a>&nbsp;MIME</h4>

<p>
The MIME scheme specifies how MIME types can be used as type
      identifiers in LDO protocols.
</p>

<p>
[more detail]
</p>

<h4><a name="anchor7">3.3</a>&nbsp;Java</h4>

<p>
The Java scheme specifies how Java class names are
      marshalled.
</p>

<p>
[more detail]
</p>

<h4><a name="anchor8">3.4</a>&nbsp;Perl</h4>

<p>
The Perl scheme specifies how Perl package names are
      marshalled.
</p>

<p>
[more detail]
</p>

<h4><a name="anchor9">3.5</a>&nbsp;Python</h4>

<p>
The Python scheme specifies how Python module and class names
      are marshalled.
</p>

<p>
[more detail]
</p>

<a name="anchor10"><br><hr size="1" shade="0"></a>
<h3>4.&nbsp;Registration of naming schemes</h3>

<p>
[possible text from RFC 1630, which describes an IANA-type
    formal registration as well as `x-'.]
</p>

<p>
[another alternative would be to take an XML-namespaces
    approach, where the scheme identifer is an alias for a URI.  This
    would require some form of prior declaration of a namespace,
    possibly in the not-yet-specified protocol negotiation phase.]
</p>

<a name="anchor11"><br><hr size="1" shade="0"></a>
<h3>5.&nbsp;BNF of Type Name Syntax</h3>

<p>
[generic type name syntax]
</p>

<h4><a name="anchor12">5.1</a>&nbsp;BNF for specific type name schemes</h4>

<p>
[LDO, MIME, Java, Perl, Python]
</p>

<a name="anchor13"><br><hr size="1" shade="0"></a>
<h3>6.&nbsp;Conformance and Interoperability</h3>

<p>
[need to fill out this section]
</p>

<a name="anchor14"><br><hr size="1" shade="0"></a>
<h3>7.&nbsp;Security Considerations</h3>

<p>
This data representation does not contain any features for
    initiating actions.
</p>

<p>
Type names are not limited in size.  Conforming implementations
    SHOULD perform sanity checks on data received to avoid buffer
    overruns and out of resource (memory, disk, etc.) conditions.
</p>

<p>
Care SHOULD be taken when instantiating objects.  Senders could
    pass type names that may be used to instantiate objects that could
    be used to bypass security restrictions. [wording, examples?]
</p>
<a name="rfc.references"><br><hr size="1" shade="0"></a>
<h3>References</h3>
<table width="99%" border="0">
<tr><td class="author-text" valign="top"><b><a name="refs.rfc1521">[1]</a></b></td>
<td class="author-text"><a href="mailto:nsb@bellcore.com">Borenstein, N.</a> and <a href="mailto:ned@innosoft.com">N. Freed</a>, "<a href="http://info.internet.isi.edu/in-notes/rfc/files/rfc2119.txt">MIME (Multipurpose Internet Mail Extensions) Part One:
        Mechanisms for Specifying and Describing the Format of
        Internet Message Bodies</a>", BCP 14, RFC 2119, September 1993.</td></tr>
<tr><td class="author-text" valign="top"><b><a name="refs.rfc1630">[2]</a></b></td>
<td class="author-text"><a href="mailto:timbl@info.cern.ch">Berners-Lee, T.</a>, "<a href="http://info.internet.isi.edu/in-notes/rfc/files/rfc1630.txt">Universal Resource Identifiers in WWW</a>", RFC 1630, June 1994.</td></tr>
<tr><td class="author-text" valign="top"><b><a name="refs.rfc2119">[3]</a></b></td>
<td class="author-text"><a href="mailto:sob@harvard.edu">Bradner, S.</a>, "<a href="http://info.internet.isi.edu/in-notes/rfc/files/rfc2119.txt">Key words for use in RFCs to Indicate Requirement Levels</a>", BCP 14, RFC 2119, March 1997.</td></tr>
</table>

<a name="rfc.authors"><br><hr size="1" shade="0"></a>
<h3>Author's Address</h3>
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="author-text">&nbsp;</td>
<td class="author-text">Ken MacLeod</td></tr>
<tr><td class="author-text">&nbsp;</td>
<td class="author-text">The Casbah Project</td></tr>
<tr><td class="author-text">&nbsp;</td>
<td class="author-text">1330 66th Street</td></tr>
<tr><td class="author-text">&nbsp;</td>
<td class="author-text">Des Moines, IA  50311</td></tr>
<tr><td class="author-text">&nbsp;</td>
<td class="author-text">US</td></tr>
<tr><td class="author" align="right">Phone:&nbsp;</td>
<td class="author-text">+1 515 279 0319</td></tr>
<tr><td class="author" align="right">EMail:&nbsp;</td>
<td class="author-text"><a href="mailto:ken@bitsko.slc.ut.us">ken@bitsko.slc.ut.us</a></td></tr>
<tr><td class="author" align="right">URI:&nbsp;</td>
<td class="author-text"><a href="http://casbah.org/Scarab/">http://casbah.org/Scarab/</a></td></tr>
</table>
</font></body></html>
